package com.hellowx.qydcdev.utils;

import lombok.extern.slf4j.Slf4j;

/**
 * Created on 2022/1/7.
 *  支付工具,模拟支付流程
 * @author Hello WX
 */
@Slf4j
public class PayUtils {

    private PayUtils(){}

    public static long toPay(long orderId){
        log.info("==================模拟支付开始========================");
        log.info("订单编号为:"+orderId);
        log.info("开始生成支付编号...");
        UniqueOrderGenerate uniqueOrderGenerate = new UniqueOrderGenerate(0,0);
        long payNo = uniqueOrderGenerate.nextId();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("==================模拟支付结束========================");
        return payNo;
    }
}
